#include "WXTMessageAuthenticationCmd.h"



WXTMessageAuthenticationCmd::WXTMessageAuthenticationCmd(QObject *parent) :
    BaseCmd(parent)
{
    this->m_protocolType = ProtocolType::WXTProtocol;
    this->m_functionCode = FunctionCode;
}

Package WXTMessageAuthenticationCmd::toPackage()
{
    Package package;
    QString head("/gateway-tcp/se/");
    package.setHead(head.toLatin1());
    package.setBody(m_body);
    package.setSeData(m_sedata);
    package.setHttpHead(m_httpHead);

    return package;
}

void WXTMessageAuthenticationCmd::unPackage(Package package)
{
     m_token = package.body();
}

void WXTMessageAuthenticationCmd::setBody(QByteArray body)
{
    m_body=body;
}

void WXTMessageAuthenticationCmd::setHead(QMap<QByteArray,QByteArray> head)
{
   m_httpHead=head;
}

void WXTMessageAuthenticationCmd::setSeData(SeData sedata)
{
    m_sedata=sedata;
}

QByteArray WXTMessageAuthenticationCmd::getToken()
{
    return m_token;
}

void WXTMessageAuthenticationCmd::setToken(QByteArray token)
{
    m_token=token;
}

